package main

import (
  _ "github.com/Go-SQL-Driver/MySQL"
  "database/sql"
  "fmt"
  //"time"
)

func main()  {
  db err := sql.Open("mysql","")
  checkErr(err)

  stmt ,err := db.Prepare("INSERT userinfo SET username=?,departname=?,created=?")
  checkErr(err)

  res err := stmt.Exec("Noah","Android","2012-1-1")
  checkErr(err)



}

func checkErr(err error)  {
  if err != nil {
    panic(err)
  }
}
